System and method for dynamically switching optical character recognition packages

ABSTRACT

An optical character recognition (OCR) scanning system utilizes a memory device, a registry, a scanning application, a processor, and a scanning device to scan the text of documents into memory. The scanning device is configured to capture an image of a document in response to a scan command from the scanning application. The scanning application locally stores a set of current parameter values indicating the location in the memory device of the OCR package that should be used to currently analyze and interpret images produced by the scanning device. If the scanning application receives a message to update the current parameter values, the scanning application retrieves new parameter values from the registry and stores these values in the memory device as the current parameter values. If the scanning application receives a message to initiate a document scan, the scanning application transmits the scan command to the scanning device and retrieves the current parameter values from the memory device. The processor uses these retrieved parameter values to locate code defining an OCR package. Once the OCR package is located, the processor executes the OCR package to analyze and interpret the image produced by the scanning device.

CROSS-REFERENCE TO RELATED APPLICATION

[0001] The present application is a continuation-in-part and claims the benefit of co-pending U.S. utility patent application entitled, “System and Method for Dynamically Switching OCR Packages,” issued Ser. No. 09/263,190, and filed Mar. 5, 1999, which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

[0002] The present invention generally relates to computer systems and, in particular, to a system and method for dynamically changing which optical character recognition (OCR) package is used to analyze an image captured by an optical scanner.

BACKGROUND

[0003] Optical character recognition (OCR) scanning systems create electronic or software copies of textual documents. In this regard, each OCR scanning system includes a scanning device that captures an image of a document. Software, referred to as an “OCR package,” associated with the scanning system is then executed to analyze the captured image in order to interpret the text of the scanned document. Once the text is determined by the OCR package, a software copy of the text is created which can be stored and manipulated according to conventional processing techniques. U.S. Pat. No. 5,212,739 entitled, “Noise Tolerant Optical Character Recognition System,” which is incorporated herein by reference, describes an OCR system capable of analyzing a scanned image to create a software copy of the text included within the scanned image.

[0004] In order to improve performance of the scanning system, it is desirable for the OCR package to be specifically tailored to the language of the scanned document. For example, the characters and words used by different languages (e.g., English, French, Spanish, etc.) are often different. Therefore, to achieve the best results, one OCR package specifically tailored for documents written in the English language should be used to interpret the image of an English language document, and another OCR specifically tailored for French should be used to interpret the image of a French language document.

[0005] Unfortunately, most OCR scanning systems do not provide the capability of dynamically switching which OCR packages are used to analyze and interpret the documents scanned by the OCR scanning system. In this regard, most conventional OCR scanning systems are initialized to use a particular OCR package. Some systems allow the user to select a particular OCR package at initialization while other systems are automatically initialized to use a default OCR package. These conventional systems utilize the OCR package selected during initialization to analyze and interpret each document scanned by the system. If the user wishes to utilize a different OCR package after initialization, the user is usually required to reinstall the scanning application along with the different OCR package so that the system may be initialized or otherwise configured to use the different OCR package.

[0006] As a result, significant delays are experienced when the user needs to scan a document with an OCR scanning system that has not been initialized to use the proper OCR package for analyzing the document. Thus, an unaddressed need exists in the industry for providing a system and method for efficiently switching the OCR package used to analyze and interpret the text of a scanned document.

SUMMARY

[0007] A system and method for dynamically switching OCR packages used to analyze and interpret the text of scanned documents is invented and disclosed. The system utilizes a memory device, a registry, a scanning application, a processor, and a scanning device. The scanning device is configured to capture an image of a document in response to a scan command from the scanning application. The scanning application locally stores a set of current parameter values indicating the location in the memory device of the OCR package that should be used to currently analyze and interpret images produced by the scanning device. If the scanning application receives a message to update the current parameter values, the scanning application retrieves new parameter values from the registry and stores these values in the memory device as the current parameter values. If the scanning application receives a message to initiate a document scan, the scanning application transmits the scan command to the scanning device and retrieves the current parameter values from the memory device. The processor uses these retrieved parameter values to locate code defining an OCR package. Once the OCR package is located, the processor executes the OCR package to analyze and interpret the image produced by the scanning device.

[0008] An OCR utility is also disclosed. The OCR utility is configured to interface with a user to determine when the user would like to select a new OCR package. When the user would like to select a new OCR package, the OCR utility updates the registry then transmits an update notification to the scanning application.

[0009] The present invention can also be viewed as providing a method for electronically scanning images of text documents into memory. Briefly described, the method can be broadly conceptualized by the following steps: providing a scanning device; providing a plurality of optical character recognition (OCR) packages to analyze images captured by the scanning device; capturing an image of a document via the scanning device; enabling a user to dynamically select one of the plurality of OCR packages; indicating which of a plurality of OCR packages is selected by the user; and analyzing the image with said OCR package that is indicated as being selected by the user in the indicating step.

[0010] Other features and advantages of the present invention will become apparent to one skilled in the art upon examination of the following detailed description, when read in conjunction with the accompanying drawings. It is intended that all such features are included within the scope of the present invention, as is defined by the

BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The invention can be better understood with reference to the following drawings. The elements of the drawings are not necessarily to scale relative to each other, emphasis instead is placed upon clearly illustrating the principles of the invention. Furthermore, like reference numerals designate corresponding parts throughout the several views.

[0012]FIG. 1 is a block diagram illustrating an embodiment of an optical character recognition (OCR) scanning system.

[0013]FIG. 2 is a block diagram illustrating an embodiment of a computer system employing the OCR-scanning system of FIG. 1.

[0014]FIG. 3 is a flow chart illustrating the architecture and functionality of the scanning application of FIG. 1.

[0015]FIG. 4 is a flow chart illustrating the architecture and functionality of the OCR utility of FIG. 1.

[0016]FIG. 5 is a flow chart illustrating a process implemented by the system depicted in FIG. 1.

[0017]FIG. 6 is a flow chart illustrating the initialization of the scanning application and the registry depicted in FIG. 1.

DETAILED DESCRIPTION

[0018] An improved optical character recognition (OCR) scanning system that may be quickly and easily configured to apply one of a number of different OCR packages is illustrated and described below. The improved OCR scanning system has the flexibility to permit the scanning of documents written in multiple languages, with greater accuracy and efficiency than systems that apply a single OCR methodology to the image of a scanned document.

[0019]FIG. 1 depicts an optical character recognition (OCR) scanning system 20 in accordance with the present invention. As shown by FIG. 1, the system 20 includes a scanning application 24, a scanning device 25, an OCR utility 27, a registry 28, and a plurality of OCR packages 29. The scanning device 25 is designed to capture an image of a document, and the OCR packages 29 are configured to analyze and interpret the text of the captured image. The registry 28 indicates which of the OCR packages 29 should be used to currently analyze and interpret the images of scanned documents. The scanning application 24 is configured to control the process of scanning and interpreting the text of a document, and the OCR utility 27 is configured to control the process of switching which OCR package 29 is utilized to interpret the scanned documents.

[0020] The scanning application 24, the OCR utility 27, and the OCR packages 29 can be implemented in software, hardware, or a combination thereof. In the preferred embodiment, as illustrated by way of example in FIG. 2, the scanning application 24, the OCR utility 27 and the OCR packages 29 along with their associated methodology are implemented in software and stored in computer memory 31 of a computer system 30.

[0021] Note that the scanning application 24, the OCR utility 27, and the OCR packages 29, when implemented in software, can be stored and transported on any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. In the context of this document, a “computer-readable medium” can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer readable medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random-access memory (RAM) (magnetic), a read-only memory (ROM) (magnetic), an erasable-programmable read-only memory (EPROM or Flash memory) (magnetic), an optical fiber (optical), and a portable compact disc read-only memory (CDROM) (optical). Note that the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory. As an example, the scanning application 24, the OCR utility 27, and the OCR packages 29 may be magnetically stored and transported on a conventional portable computer diskette(s).

[0022] The computer system 30 of FIG. 2 comprises one or more conventional processing elements 32, such as a digital signal processor (DSP), that communicate to and drive the other elements within the system 30 via a local interface 33, which can include one or more buses. Furthermore, an input device 34, for example, a keyboard or a mouse, can be used to input data from a user of the system 30, and screen display 35 or a printer 36 can be used to output data to the user. A disk storage mechanism 37 can be connected to the local interface 33 to transfer data to and from a nonvolatile disk(s) (e.g., magnetic, optical, etc.). In addition, the local interface 33 can be connected to a registry 28 that, as known in the art, includes information regarding operation of the computer system 30. The system 30 can be connected to a network interface 41 that allows the system 30 to exchange data with a network 43. Furthermore, system 30 can be connected to scanning device 25, which is a well-known device configured to capture an electronic image of a document.

[0023]FIG. 3 depicts the architecture and functionality of the scanning application 24. As shown by block 61 of FIG. 3, the scanning application 24 is configured to retrieve OCR-parameter values from registry 28 during initialization of the scanning application 24. The retrieved OCR-parameter values indicate the location in memory of a particular OCR package 29. As known in the art, each OCR package 29 is configured to analyze an image captured by the scanning device 25 in order to interpret the text included in the image. As described above in the Background section, each OCR package 29 is usually tailored to a particular language, such as English, Spanish or French, for example, and therefore is configured differently than other OCR packages 29.

[0024] The registry 28 is designed to indicate which set of OCR-parameter values is current via utilization of a pointer or some other suitable structure and/or technique. The selection of the current OCR-parameter values will be discussed in further detail below. When the scanning application 24 retrieves OCR-parameter values from the registry 28, the scanning application 24 is configured to determine which set of OCR-parameter values is indicated as current by the registry 28 and to retrieve the current OCR-parameter values.

[0025] After retrieving the current OCR-parameter values from registry 28, the scanning application 24 is designed to store the current OCR-parameter values in memory 31, as shown by block 65 of FIG. 3. Then, the scanning application 24 is designed to wait for a notification to either initiate a document scan or to update the OCR package 29 used to scan documents, as shown by blocks 71 and 73 of FIG. 3.

[0026] If a notification to update the OCR package 29 is received or detected, then the scanning application 24 is designed to update the current OCR-parameter values stored in memory 31 by repeating blocks 61 and 65, as shown by FIG. 3. Therefore, the scanning application 24 is designed to retrieve new OCR-parameter values and to store these new OCR-parameter values in memory 31 in response to the notification to update the OCR-parameter values. The new OCR-parameter values correspond to the OCR-parameter values indicated as current by the registry 28 when the scanning application 24 retrieves the new OCR-parameter values.

[0027] However, if a notification to initiate a document scan is received or detected, then the scanning application 24 is designed to instruct the scanning device 25 to capture an image, as shown by block 74. Once the image is captured, the scanning application 24, as shown by block 76, is designed to retrieve the OCR-parameter values that were most recently stored in memory 31 in block 65 (i.e., the current OCR-parameter values). The OCR package 29 at the location in memory 31 defined by the current OCR-parameter values retrieved in block 76 is then executed to interpret and define the text included in the captured image, as depicted by block 79. Thereafter, the data produced by the execution of the OCR package 29 (i.e., the data defining the text of the captured image) can be stored and manipulated as desired according to techniques well known in the art.

[0028] The architecture and functionality of the OCR utility 27 is shown by FIG. 4. As shown by blocks 83 and 85, the OCR utility 27, through techniques known in the art, is designed to utilize user interfaces (e.g., input device 34 and display 35) to determine whether a user wishes to select a new OCR package 29.

[0029] If the OCR utility 27 determines that the user wishes to select a new OCR package 29, then the OCR utility 27 is first designed to update the registry 28, as shown by block 88. In this regard, the OCR utility 27 is designed to change which set of OCR-parameter values are indicated as current by the registry 28 so that the OCR-parameter values corresponding with the OCR package 29 (i.e., defining the location in memory of the OCR package 29) currently selected by the user are indicated by the registry 28 as current. Then, as depicted by block 91, the OCR utility 27 is configured to transmit a notification to the scanning application 24 to notify the scanning application 24 of the selection of the new OCR package 29. In response, the scanning application 24 updates the current OCR-parameter values stored in memory 31, as described above.

Operation

[0030] The preferred use and operation of the system 20 and associated methodology are described below. Referring to FIG. 5, scanning device 25, scanning application 24, and OCR utility 27 are initially installed on the computer system 30, as shown by block 101. Furthermore, at least one OCR package 29 is installed in block 101, although it is possible to install the OCR package(s) 29 at other times. To install the scanning application 24, OCR utility 27, and OCR package 29, code defining the scanning application 24, OCR utility 27, and OCR package 29 is stored in memory 31. In this regard, the code can be read from a disk(s) located in the disk storage device 37, through techniques known in the art.

[0031] Next, the scanning application 24 and registry 28 are initialized, as shown by block 103. As known in the art, the registry 28 includes information pertaining to the operation of the system 30. This information includes the OCR-parameter values (i.e., values indicating the location in memory 31 of an OCR package 29, associated with each OCR package 29 installed on the system 30. The registry 28 is initialized by indicating which set of OCR-parameter values is current, as depicted by block 104 (FIG. 6). For example, a pointer can be defined that points to the OCR-parameter values that are selected as current. The current OCR-parameter values can be selected during initialization based on default standards or on inputs received from the user. As will be discussed in further detail below, the OCR-parameter values indicated by the registry 28 as current can be changed, as desired. Once the registry 28 is initialized, the scanning application 24 is initialized by reading the current OCR-parameter values from the registry 28 and storing these values in memory 31, as shown by block 105 and 107 (FIG. 6).

[0032] After initialization, a user may specify via input device 34 to initiate a document scan. For example, assume that the current OCR-parameter values selected during initialization define the location of an English language OCR package 29 and that the user wishes to scan an English language document. Since the current OCR-parameter values correspond to an English language OCR package 29, the current OCR-parameter values do not need to be updated before the user requests a document scan. Therefore, the user enters a request via input device 34 to scan the document, and the input device 34 transmits a scan message to the scanning application 24 indicating that a document is ready to be scanned.

[0033] In response, the scanning application 24 instructs the scanning device 25 to capture an image of the document, as shown by blocks 73 and 74. Then, in block 76, the scanning application 24 retrieves the current OCR-parameter values stored in memory 31. These values indicate the location in memory 31 of the currently selected OCR package 29 (i.e., the English language OCR package 29 in this example) and are used in block 79 by the processing element 32 (FIG. 2) to execute the code defined by the data located at this location. During execution, the OCR package 29 interprets the text of the scanned document by analyzing an image of the document through techniques known in the art. Once the text is interpreted and defined in data, the text can be manipulated, stored, and/or printed through techniques known in the art.

[0034] Assume now that the user desires to scan a document written in the French language. Since the currently selected OCR package 29 (i.e., the English language OCR package 29 in this example) does not correspond with the language of the document to be scanned, the selected OCR package 29 should be changed. In this regard, the user via input device 34 indicates that the selected OCR package 29 should be a French language OCR package 29. In response, the OCR utility 27 updates the registry 28 such that the registry 28 now indicates that another set of OCR-parameter values is labeled as current, as shown by blocks 71 and 88. In particular, the registry 29 is updated such that a set of OCR-parameter values defining the location of a French language OCR package 29 are indicated as current.

[0035] Once the registry 28 is updated, the OCR utility 27 transmits an update message to the scanning application 24 in block 91 to update the current OCR-parameter values (i.e., to change the OCR package 29 used to analyze and interpret images). In response, the scanning application 24 in blocks 61 and 65 retrieves the OCR-parameter values indicated by the registry 28 as current and stores these values in memory 31 as the current OCR-parameter values. In the example described above, these OCR-parameter values indicate the location in memory 31 of the French language OCR package 29.

[0036] Next, after the user indicates that the French document is ready to be scanned and a scan message is detected by the scanning application 24, the scanning application 24 instructs the scanning device 25 to capture an image of the document, as depicted by block 74. Then, the scanning application 24 in block 76 retrieves the current OCR-parameter values stored in memory 31 (i.e., the OCR-parameter values defining the location in memory 31 of the French language OCR package 29 in the example described above), and the code located at the location in memory 31 defined by these OCR-parameter values is executed, as shown by block 79. The execution of this code results in an analysis and interpretation of the text of the scanned document. Once the text is interpreted, it can be defined in data and manipulated, stored, and/or printed through conventional techniques.

[0037] As a result, different OCR packages 29 can be utilized to scan and interpret documents without rebooting the system 30 or reinstalling the scanning application 24 along with a new OCR package 29. In other words, a user can dynamically change which OCR package 29 is used to scan a document, thereby increasing the efficiency of the system 30.

[0038] It should be noted that it is not necessary for the user to request a change to the current OCR package 29 used by the system 20. In this regard, it is possible for a user to merely specify that a document is ready to be scanned and the language of the document. The OCR utility 27 can then determine whether the currently selected OCR package 29 is suitable for analyzing the document. If the currently selected OCR package 29 is suitable, then the scanning application 24 may begin the described operation. However, if the currently selected OCR package is not suitable, then the selection of the current OCR package 29 is changed according to the techniques described above.

Code

[0039] The following is an example of code that may be used to implement a portion of the functionality of the scanning application 24. In this regard, the following code gives the scanning application 24 the capability of detecting a notification to update which OCR package 29 is currently selected and of updating the current OCR-parameter values stored in memory 31 in response to the notification. LRESULT CMainFrame::OnOCRUpdate(WPARAM wParam, LPARAM lParam) { // Load Strategy Settings HKEY regkey; LONG retcode = RegOpenKeyEx (HKEY_LOCAL_MACHINE, “Software\\Hewlett-Packard\\ScanJet\\IST\\1.1\\”, 0, KEY_QUERY_VALUE, &regkey); If (retcode == ERROR_SUCCESS) { ESTRATEGY Strategy; char OCRPath[500]; DWORD Size = sizeof (OCRPath); If (RegQueryValueEx (regkey, “OCR Path”, NULL, NULL, (UINT8*) OCRPath, &Size) == ERROR_SUCCESS) { REAL_FILE *pOCRfile = new REAL_FILE; { pOCRFile−>SetName (OCRPath); }}}}

[0040] In concluding the detailed description, it should be noted that it will be obvious to those skilled in the art that many variations and modifications may be made to the preferred embodiment without substantially departing from the principles of the present invention. All such variations and modifications are intended to be included within the scope of the present invention, as set forth in the following claims. 

Now, therefore, the following is claimed:
 1. A method for electronically scanning images of text documents into memory, comprising the steps of: capturing an image of a document via a scanning device; dynamically selecting one of a plurality of OCR packages; indicating which of the plurality of OCR packages is selected; and analyzing said image with said OCR package that is indicated as being selected in said indicating step.
 2. The method of claim 1, further comprising the steps of: receiving a request from a user to change which of said plurality of OCR packages is selected; and changing which of said OCR packages is indicated as being selected by said user in response to said request.
 3. The method of claim 2, wherein the step of receiving a request from said user to change which of said plurality of OCR packages is selected comprises a scanning application having a set of parameter values defining a location in a memory device, the scanning application configured to receive an update message.
 4. The method of claim 2, wherein the step of changing which of said OCR packages is indicated as being selected by said user in response to said request comprises a scanning application having a set of parameter values defining a location in a memory device, the scanning application configured to receive an update message, said scanning application configured to retrieve a new set of parameter values from a registry within the memory device in response to said update message.
 5. The method of claim 1, further comprising the step of: enabling a user to dynamically change which of said plurality of OCR packages is selected by said user.
 6. The method of claim 5, wherein the step of enabling a user to dynamically change which of said plurality of OCR packages is selected by said user comprises retrieving OCR parameter values and executing an OCR package located at a memory address defined by the OCR parameter values.
 7. The method of claim 5, wherein the step of enabling a user to dynamically select one of said plurality of OCR packages comprises updating a registry.
 8. The method of claim 1, further comprising the steps of: providing a scanning device; and providing a plurality of optical character recognition (OCR) packages to analyze images captured by said scanning device.
 9. The method of claim 1, wherein the step of indicating which of a plurality of OCR packages is selected by said user comprises reading a registry.
 10. A computer system for analyzing an electronic image of a document captured by an optical character recognition (OCR) scanning device, comprising: logic configured to enable a user to dynamically select one of a plurality of OCR packages to analyze said image; logic configured to indicate which of said plurality of OCR packages is selected by said user; and logic configured to execute said OCR package selected by said user.
 11. The system of claim 10, wherein the logic configured to indicate which of said plurality of OCR packages is selected by said user comprises a registry.
 12. The system of claim 10, further comprising: logic configured to enable said user to dynamically change which of said plurality of OCR packages is selected by said user.
 13. The system of claim 12, wherein the logic configured to enable said user to dynamically change which of said plurality of OCR packages is selected by said user comprises retrieving OCR parameter values and executing an OCR package located at a memory address defined by the OCR parameter values.
 14. An optical character recognition (OCR) system for electronically scanning text of documents into memory, comprising: a scanning device for capturing images of documents; a computing device coupled to the scanning device, the computing device configured with a plurality of OCR packages for analyzing said images captured by said scanning device; means for enabling a user to dynamically select one of said plurality of OCR packages to analyze said image captured by said scanning device; means for indicating which of a plurality of OCR packages is selected by said user to analyze said image; and means for analyzing said image with said OCR package that is indicated by said indicating means as being selected by said user.
 15. The system of claim 14, further comprising: means for receiving a request from said user to change which of said OCR packages is selected; and means for changing which of said OCR packages is indicated as being selected by said user in response to said request.
 16. The system of claim 14, further comprising: means for enabling, said user to dynamically change which of said plurality of OCR packages is selected by said user. 